package com.example.nettydemo;

import com.example.nettydemo.config.GameConfig;
import com.example.nettydemo.server.NettyServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@MapperScan(basePackages = "com.example.nettydemo.mapper")
//@EnableScheduling
public class NettyDemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(NettyDemoApplication.class, args);
        GameConfig gameConfig = context.getBean(GameConfig.class);
        System.out.println(gameConfig);
        NettyServer nettyServer = context.getBean(NettyServer.class);
        nettyServer.start();
    }



}
